Fix code scanning issues: CodeQL setup and workflow permissions#32
Merged
Conversation
- Adds an advanced-setup CodeQL workflow. The Gusto enterprise security config disables code scanning default (automatic) setup org-wide, which has left default CodeQL setup stuck erroring for this repo. An explicit workflow switches to advanced setup, which isn't subject to that policy. - Adds an explicit permissions: contents: read to ci.yml to resolve the actions/missing-workflow-permissions code scanning finding; the shared-config reusable CI workflow only checks out code and posts to a Slack webhook, neither of which needs write access.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Gusto Default Advanced Security, enforced) disables code scanning default (automatic) setup org/enterprise-wide, which has left this repo's default CodeQL setup stuck erroring since the policy took effect. Adds.github/workflows/codeql.yml, an explicit advanced setup workflow that isn't subject to that policy — same fix as rubyatscale/query_packwerk#37.actions/missing-workflow-permissionscode scanning finding onci.yml: thecall-workflow-from-shared-configjob (and any other jobs in this file) had no explicitpermissionsblock, so it defaulted to the repository's token permissions. Adds a root-levelpermissions: contents: read, since the shared-config reusable workflow only checks out code and posts to a Slack webhook — same fix as rubyatscale/query_packwerk#38.Test plan
CIworkflow still passes after mergeCodeQLworkflow runs successfully onmain